#include "sc_internal.h"
#include <stdio.h>

static void test_subtopic()
{
    //char path[] = "b/1/24/";
    char path[] = "b/+/w";
    char* p = path;
    char *local_sub;
    char **topics;
    const char *sharename = NULL;
    int index = 0;
    sub_topic_tokenise(p,&local_sub,&topics,&sharename);
    while(topics && topics[index] != NULL)
    {
        printf("topic:%s\n",topics[index]);
        index++;
    }
}

int main(){

    test_subtopic();
    return 0;
    
    char path[] = "b/1/24/5";
    char* p = path;
    char* token;
    token = strtok_hier(NULL,&p);
    while(token)
    {
        printf("path:%s\n",token);
        token = strtok_hier(NULL,&p);
    }
    return 0;
}